/**
 * 中心介绍
 */
(function() {
	'use strict';
	require(['jquery','masonry'], function() {
		var container = $('#sys_center_image');	
		container.imagesLoaded(function(){
			container.masonry({
				itemSelector: '.image_list',
				isAnimated : true,
				columnWidth: 5 //每两列之间的间隙为5像素
			});
		});
		var carrousel = $( ".carrousel" );
		$( ".image_list" ).click( function(e){
		  var src = $(this).find(".pic").attr( "data-src-wide" );
		  carrousel.find("img").attr( "src", src );
		  carrousel.fadeIn( 200 );
		});

		carrousel.find( ".close" ).click( function(e){
		  carrousel.find( "img" ).attr( "src", '' );
		  carrousel.fadeOut( 200 );
		});
	});
})();
